<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // 注意，Array.length 并不总是等于数组中元素的个数
      var a = ['dog', 'cat', 'hen']
      a[100] = 'fox'
      a.length // 101
      console.log(a)
      window.onresize = function() {
        console.log(document.body.clientWidth)
      }
    </script>
  </body>
</html>
